///*
// * Note from shayner: This is an example taken from the internet at
// * http://gpwiki.org/index.php/C:Playing_a_WAV_Sound_File_With_SDL_mixer
// * and also at
// * http://gpwiki.org/index.php/C:Using_SDL_mixer_to_play_an_Ogg_music_file
// * 
// * Use it and learn, boy! 
// */
//#include <string>
//#include <iostream>
// 
//#include <SDL/SDL.h>
//#include <SDL/SDL_mixer.h>
//
//using namespace std;
//
//int musicPlaying = 0;
//
//void musicFinished()
//{
//	musicPlaying = 0;
//}
//
//int main(int argc, char **argv)
//{
//	// Initialize SDL normally, but now with the audio enabled so that
//	// SDL_mixer has access to the hardware.
//	if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO) != 0)
//	{
//		cerr << "Unable to initialize SDL: " << SDL_GetError() << endl;
//		return EXIT_FAILURE;
//	}
//
//	int audio_rate = 44100; // in Hertz.
//	Uint16 audio_format = AUDIO_S16SYS; // There are other forms too.
//	int audio_channels = 2;
//	int audio_buffers = 4096; 
//
//	// Initialize the mixer.
//	if(Mix_OpenAudio(
//			audio_rate, audio_format, audio_channels, audio_buffers) != 0)
//	{
//		cerr << "Unable to initialize audio: " << Mix_GetError() << endl;
//		return EXIT_FAILURE;
//	}
//
//	// Initialize the sound that is played at the very beginning, on top of the
//	// music.
//	Mix_Chunk *sound = NULL;
//	
//	sound = Mix_LoadWAV("/home/shayne/Desktop/sample.wav");
//	if(sound == NULL)
//	{
//		cerr << "Unable to load WAV file: " << Mix_GetError() << endl;
//		return EXIT_FAILURE;
//	}
//
//	// Initialize the music to play in the background.
//	Mix_Music *music;
//	music = Mix_LoadMUS("/home/shayne/Desktop/audio.ogg");
//	if(music == NULL)
//	{
//		cout << "Unable to load Ogg file: " << Mix_GetError() << endl;
//		return EXIT_FAILURE;
//	}
//
//	// Initialize the SDL window. Of course, this must occur or nothing works.
//	SDL_Surface *screen;
//
//	screen = SDL_SetVideoMode(320, 240, 0, SDL_ANYFORMAT);
//	if (screen == NULL) {
//		cerr << "Unable to set video mode: " << SDL_GetError() << endl;
//		return EXIT_FAILURE;
//	}
//
//	// Start the music.
//	if(Mix_PlayMusic(music, 0) == -1)
//	{
//		cerr << "Unable to play Ogg file: " << Mix_GetError() << endl;
//		return EXIT_FAILURE;
//	}
//
//	// Start the audio sample.
//	int channel;
//	
//	channel = Mix_PlayChannel(-1, sound, 0);
//	if(channel == -1)
//	{
//		cerr << "Unable to play WAV file: " << Mix_GetError() << endl;
//	}
//
//	// Waif for music to stop
//	musicPlaying = 1;
//	Mix_HookMusicFinished(musicFinished);
//	
//	while(musicPlaying)
//	{
//		// Do nothing for a bit
//		SDL_Delay(100);
//	}
//
//	// Wait for ALL audio to stop, just in case I missed something.
//	while(Mix_Playing(channel) != 0);
//	 
//	Mix_FreeChunk(sound); // Release the sample from memory.
//
//	Mix_HaltMusic(); // Stop playing the music, just in case.
//	Mix_FreeMusic(music); // Release the music from memory.
//	Mix_CloseAudio(); // Close the mixer.
//	SDL_Quit(); // Shut down SDL nicely.
//
//	cout << "Success!" << endl;
//
//	return EXIT_SUCCESS;
//}
